package com.example.androidkt.second

import androidx.appcompat.app.ActionBarDrawerToggle.Delegate


/**
 *
 * 委托
 * */
class MySet<T>(val helper:HashSet<T>) : Set<T>{
    override val size: Int = helper.size

    override fun isEmpty(): Boolean = helper.isEmpty()

    override fun iterator(): Iterator<T> = helper.iterator()

    override fun containsAll(elements: Collection<T>): Boolean = helper.containsAll(elements)

    override fun contains(element: T): Boolean = helper.contains(element)

}

class MySets<T>(val helper:HashSet<T>) : Set<T> by helper{
    fun hello() = println("hello")
}

val p by lazy {

}

fun main() {
    p
}

